(function (win, doc) {
    if (!win.addEventListener) return;

    function setFont() {
        var html = document.documentElement;
        var k = 1920;
        var size = html.clientWidth / k * 100;
        // console.log(size)
        // if (size >= 130) html.style.fontSize = '130px';
        if (size >= 100) html.style.fontSize = '100px';
        else if (size <= 64) html.style.fontSize = '64px';
        else html.style.fontSize = size + 'px';
    }

    setFont();
    setTimeout(function () {
        setFont();
    }, 300);
    doc.addEventListener('DOMContentLoaded', setFont, false);
    win.addEventListener('resize', setFont, false);
    win.addEventListener('load', setFont, false);
})(window, document);
